In [1]:
import pandas as pd
import numpy as np
import plotly.express as px


dffile = r'TEMP\HPC_SAMFormat.csv'

df = pd.read_csv(dffile)
In [2]:
df.set_index('datetime', inplace=True)
In [3]:
df.keys()
Out[3]:
Index(['Year', 'Month', 'Day', 'Hour', 'Wspd', 'Tdry', 'DNI', 'DHI', 'GHI',
       'rh', 'pressure', 'Albedo', 'EastFacing_POA', 'WestFacing_POA',
       'East_Performance', 'West_Performance', 'solpos_zenith',
       'solpos_azimuth', 'SouthFacing_POA', 'NorthFacing_POA',
       'North_Performance', 'South_Performance'],
      dtype='object')
In [4]:
fig = px.line(df, x=df.index, y=["DNI", 'DHI', 'GHI'])
fig.show()
In [21]:
fig = px.line(df, x=df.index, y=["North_Performance", "East_Performance", "South_Performance", "West_Performance"])
fig.show()
In [26]:
fig = px.histogram(df, x=df.index, y="North_Performance", histfunc="avg", title="Histogram on Date Axes")
fig.update_traces(xbins_size="M1")
In [29]:
 
Out[29]:
datetime
2021-01-01 00:00:00-03:00    1087.963441
2021-01-01 01:00:00-03:00    1123.160486
2021-01-01 02:00:00-03:00    1111.483654
2021-01-01 03:00:00-03:00    1043.794416
2021-01-01 04:00:00-03:00     939.630716
                                ...     
2021-12-31 19:00:00-03:00     794.245927
2021-12-31 20:00:00-03:00     708.369757
2021-12-31 21:00:00-03:00     710.374610
2021-12-31 22:00:00-03:00     775.085668
2021-12-31 23:00:00-03:00     758.659913
Length: 8760, dtype: float64
In [30]:
df['NSEW_Performance'] = df[["North_Performance", "East_Performance", "South_Performance", "West_Performance"]].sum(axis=1)
In [45]:
fig = px.line(df, x=df.index, y='NSEW_Performance')
fig.show()
In [33]:
df['NSEW_PR'] = df['NSEW_Performance']/(1200)
In [44]:
fig = px.histogram(df, x=df.index, y="NSEW_PR", histfunc="avg", title="Histogram on Date Axes")
fig.update_traces(xbins_size="M1")
In [ ]: